Respect HTTP method for links path in EndpointRequest.toAnyEndpoint()#50124
Closed
nikitanagar08 wants to merge 2 commits into
Closed
Respect HTTP method for links path in EndpointRequest.toAnyEndpoint()#50124nikitanagar08 wants to merge 2 commits into
nikitanagar08 wants to merge 2 commits into
Conversation
Fixes spring-projectsgh-50096 RecordParameterPropertyDescriptor.isMarkedAsNested now checks both the record component and the getter method for @NestedConfigurationProperty, matching the behavior of JavaBeanPropertyDescriptor and ConstructorParameterPropertyDescriptor. This ensures consistency across all property descriptor types and allows @NestedConfigurationProperty to work correctly when placed on record accessor methods.
Fixes spring-projectsgh-50095 EndpointRequest.toAnyEndpoint().withHttpMethod() now applies the configured HTTP method to the links path in addition to endpoint paths. Previously, calling toAnyEndpoint().withHttpMethod(POST) restricted endpoint paths to POST but the links path (/actuator and /actuator/) still matched any HTTP method. Changes: - Updated getLinksMatchers() to accept and use httpMethod parameter - Modified LinksServerWebExchangeMatcher to accept httpMethod in constructor - Strengthened tests to verify links path respects configured HTTP method - Both servlet and reactive implementations updated The toLinks() matcher continues to accept any HTTP method to maintain backward compatibility.
Member
|
Duplicates #50095. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes gh-50095
EndpointRequest.toAnyEndpoint().withHttpMethod() now applies the configured HTTP method to the links path in addition to endpoint paths.
Previously, calling toAnyEndpoint().withHttpMethod(POST) restricted endpoint paths to POST but the links path (/actuator and /actuator/) still matched any HTTP method.
Changes:
The toLinks() matcher continues to accept any HTTP method to maintain backward compatibility.
Test Results:
All EndpointRequest tests pass, including: